;layui.define(function (e) {
    layui.use(['form', 'element', 'laytpl', 'http', 'jquery', 'jclock'], function () {
        var element = layui.element
            , laytpl = layui.laytpl
            , http = layui.http
            , jclock = layui.jclock
            , $ = layui.jquery;
        http.get({
            loading: false,
            url: '/getMenus',
            success: function (res) {
                var getTpl = $('#menuNav').html()
                    , view = $('#LAY-system-side-menu');
                laytpl(getTpl).render(res.data, function (html) {
                    view.html(html);
                    element.init();
                });
            }
        });
        fn.sideFlexible = function () {
            $('#LAY_app .flexible').click();
        };
        fn.emrIndexClick = function(){
            var el = '#LAY-system-side-menu .layui-nav-item dd a[lay-href="emr/index"]';
            $(el).click();
        }
        $('.now-time').jclock({withDate: true, withWeek: true, withTime: false});
    });

    e("navigation", {})
});